package com.porm.framework.mapper;

import com.porm.framework.annotation.ORMOperate;
import com.porm.framework.enumeration.OperationType;

import java.util.List;

/**
 * Mapper 基础实现类，
 * 目前只有三个方法，如果需要可以在此添加
 *
 * @author humdeef
 * @date 2018/11/12
 */
public class Mapper<T> {

    @ORMOperate(type = OperationType.SELECT)
    public List<T> selectAll(T o) {
        return null;
    }

    public List<T> selectOneByPk(Long id) {
        return null;
    }

    @ORMOperate(type = OperationType.SAVE)
    public int save(T o) {
        return 0;
    }


    @ORMOperate(type = OperationType.UPDATE)
    public void update(T o) {
        return;
    }

    @ORMOperate(type = OperationType.DELETE)
    public void delete(T id) {
        return;
    }
}